package io.genezhao.mybatisplus.mvc.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import io.genezhao.mybatisplus.BaseService;
import io.genezhao.mybatisplus.mvc.entity.User;
import io.genezhao.mybatisplus.mvc.mapper.UserMapper;
import io.genezhao.mybatisplus.mvc.service.UserService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.genezhao.mybatisplus.mvc.vo.UserVo;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author genezhao
 * @since 2018-06-12
 */
@Service
public class UserServiceImpl extends BaseService<UserMapper, User> implements UserService {

    @Override
    public Page<User> selectUserPage(int currentPage, int pageSize,UserVo userVo) {
        Page<User> page = buildPage(currentPage,pageSize,null);
        page.setRecords(baseMapper.selectUserList(page, userVo));
        return page;
    }
}
